.class public Lcom/estrongs/android/widget/CircleIndicatorView;
.super Landroid/view/View;
.source "CircleIndicatorView.java"

# interfaces
.implements Landroidx/viewpager/widget/ViewPager$OnPageChangeListener;


# instance fields
.field private a:I

.field private b:Landroid/graphics/Paint;

.field private c:I

.field private d:I

.field private e:I

.field private f:I

.field private g:I

.field private h:I

.field private i:I

.field private j:Landroidx/viewpager/widget/ViewPager;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    .line 1
    invoke-direct {p0, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    const/4 p1, -0x1

    .line 2
    iput p1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->a:I

    const/4 p1, 0x0

    .line 3
    iput p1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->c:I

    const/4 v0, 0x6

    .line 4
    iput v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->d:I

    const/4 v0, 0x2

    .line 5
    iput v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->e:I

    .line 6
    iput p1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->f:I

    const/4 v0, 0x5

    .line 7
    iput v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->h:I

    .line 8
    iput p1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->i:I

    .line 9
    invoke-direct {p0}, Lcom/estrongs/android/widget/CircleIndicatorView;->a()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    .line 10
    invoke-direct {p0, p1, p2}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 v0, -0x1

    .line 11
    iput v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->a:I

    const/4 v0, 0x0

    .line 12
    iput v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->c:I

    const/4 v1, 0x6

    .line 13
    iput v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->d:I

    const/4 v1, 0x2

    .line 14
    iput v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->e:I

    .line 15
    iput v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->f:I

    const/4 v1, 0x5

    .line 16
    iput v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->h:I

    .line 17
    iput v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->i:I

    .line 18
    invoke-direct {p0, p1, p2}, Lcom/estrongs/android/widget/CircleIndicatorView;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 19
    invoke-direct {p0}, Lcom/estrongs/android/widget/CircleIndicatorView;->a()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 1
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    .line 20
    invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p3, -0x1

    .line 21
    iput p3, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->a:I

    const/4 p3, 0x0

    .line 22
    iput p3, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->c:I

    const/4 v0, 0x6

    .line 23
    iput v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->d:I

    const/4 v0, 0x2

    .line 24
    iput v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->e:I

    .line 25
    iput p3, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->f:I

    const/4 v0, 0x5

    .line 26
    iput v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->h:I

    .line 27
    iput p3, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->i:I

    .line 28
    invoke-direct {p0, p1, p2}, Lcom/estrongs/android/widget/CircleIndicatorView;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 29
    invoke-direct {p0}, Lcom/estrongs/android/widget/CircleIndicatorView;->a()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
    .locals 0
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param
    .annotation build Landroidx/annotation/RequiresApi;
        api = 0x15
    .end annotation

    .line 30
    invoke-direct {p0, p1, p2, p3, p4}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V

    const/4 p3, -0x1

    .line 31
    iput p3, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->a:I

    const/4 p3, 0x0

    .line 32
    iput p3, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->c:I

    const/4 p4, 0x6

    .line 33
    iput p4, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->d:I

    const/4 p4, 0x2

    .line 34
    iput p4, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->e:I

    .line 35
    iput p3, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->f:I

    const/4 p4, 0x5

    .line 36
    iput p4, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->h:I

    .line 37
    iput p3, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->i:I

    .line 38
    invoke-direct {p0, p1, p2}, Lcom/estrongs/android/widget/CircleIndicatorView;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 39
    invoke-direct {p0}, Lcom/estrongs/android/widget/CircleIndicatorView;->a()V

    return-void
.end method

.method private a()V
    .locals 2

    .line 1
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    const/4 v1, 0x1

    .line 2
    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setDither(Z)V

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 5
    iget-object v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Cap;->ROUND:Landroid/graphics/Paint$Cap;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeCap(Landroid/graphics/Paint$Cap;)V

    .line 6
    invoke-direct {p0}, Lcom/estrongs/android/widget/CircleIndicatorView;->b()V

    return-void
.end method

.method private a(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    .line 7
    sget-object v0, Lcom/estrongs/android/pop/n;->CircleIndicatorView:[I

    invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;

    move-result-object p1

    const/high16 p2, 0x40c00000    # 6.0f

    .line 8
    invoke-static {p2}, Lcom/estrongs/android/pop/utils/t;->a(F)I

    move-result p2

    const/4 v0, 0x4

    invoke-virtual {p1, v0, p2}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I

    move-result p2

    iput p2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->d:I

    const/high16 p2, 0x41400000    # 12.0f

    .line 9
    invoke-static {p2}, Lcom/estrongs/android/pop/utils/t;->a(F)I

    move-result p2

    const/4 v0, 0x3

    invoke-virtual {p1, v0, p2}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I

    move-result p2

    iput p2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->f:I

    const/high16 p2, 0x40000000    # 2.0f

    .line 10
    invoke-static {p2}, Lcom/estrongs/android/pop/utils/t;->a(F)I

    move-result p2

    const/4 v0, 0x1

    invoke-virtual {p1, v0, p2}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I

    move-result p2

    iput p2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->e:I

    const/high16 p2, 0x40a00000    # 5.0f

    .line 11
    invoke-static {p2}, Lcom/estrongs/android/pop/utils/t;->a(F)I

    move-result p2

    const/4 v0, 0x6

    invoke-virtual {p1, v0, p2}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I

    move-result p2

    iput p2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->h:I

    const/4 p2, 0x5

    const/4 v0, -0x1

    .line 12
    invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getColor(II)I

    move-result p2

    iput p2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->a:I

    const/4 p2, 0x2

    const v0, -0x777778

    .line 13
    invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getColor(II)I

    move-result p2

    iput p2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->g:I

    .line 14
    invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V

    return-void
.end method

.method private b()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    iget v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->g:I

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    iget v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->e:I

    int-to-float v1, v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    return-void
.end method

.method private c()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->j:Landroidx/viewpager/widget/ViewPager;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0, p0}, Landroidx/viewpager/widget/ViewPager;->removeOnPageChangeListener(Landroidx/viewpager/widget/ViewPager$OnPageChangeListener;)V

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->j:Landroidx/viewpager/widget/ViewPager;

    :cond_0
    return-void
.end method


# virtual methods
.method public a(II)V
    .locals 0

    .line 15
    iput p1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->g:I

    .line 16
    iput p2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->a:I

    .line 17
    invoke-virtual {p0}, Landroid/view/View;->invalidate()V

    return-void
.end method

.method public a(Landroidx/viewpager/widget/ViewPager;I)V
    .locals 0

    .line 18
    invoke-direct {p0}, Lcom/estrongs/android/widget/CircleIndicatorView;->c()V

    if-nez p1, :cond_0

    return-void

    .line 19
    :cond_0
    iput-object p1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->j:Landroidx/viewpager/widget/ViewPager;

    .line 20
    invoke-virtual {p1, p0}, Landroidx/viewpager/widget/ViewPager;->addOnPageChangeListener(Landroidx/viewpager/widget/ViewPager$OnPageChangeListener;)V

    .line 21
    iput p2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->c:I

    .line 22
    invoke-virtual {p0}, Landroid/view/View;->invalidate()V

    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 9

    .line 1
    invoke-virtual {p0}, Landroid/view/View;->getMeasuredHeight()I

    move-result v0

    div-int/lit8 v0, v0, 0x2

    int-to-float v0, v0

    const/4 v1, 0x0

    const/4 v2, 0x0

    const/4 v7, 0x0

    .line 2
    :goto_0
    iget v2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->c:I

    if-ge v7, v2, :cond_3

    if-nez v7, :cond_0

    .line 3
    iget v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->d:I

    iget v2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->e:I

    add-int/2addr v1, v2

    int-to-float v1, v1

    goto :goto_1

    .line 4
    :cond_0
    iget v2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->d:I

    iget v3, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->e:I

    add-int/2addr v2, v3

    mul-int/lit8 v2, v2, 0x2

    iget v3, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->h:I

    add-int/2addr v2, v3

    int-to-float v2, v2

    add-float/2addr v1, v2

    .line 5
    :goto_1
    iget v2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->i:I

    if-ne v7, v2, :cond_1

    .line 6
    iget v2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->f:I

    int-to-float v2, v2

    add-float/2addr v1, v2

    :cond_1
    move v8, v1

    .line 7
    iget v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->i:I

    if-ne v1, v7, :cond_2

    .line 8
    iget-object v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    iget v2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->a:I

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V

    .line 9
    iget-object v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    iget v2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->d:I

    mul-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 10
    iget v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->f:I

    int-to-float v2, v1

    sub-float v2, v8, v2

    int-to-float v1, v1

    add-float v4, v2, v1

    .line 11
    iget-object v6, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    move-object v1, p1

    move v3, v0

    move v5, v0

    invoke-virtual/range {v1 .. v6}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    goto :goto_2

    .line 12
    :cond_2
    iget-object v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    iget v2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->g:I

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V

    .line 13
    iget-object v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    iget v2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->e:I

    int-to-float v2, v2

    invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 14
    iget v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->d:I

    int-to-float v1, v1

    iget-object v2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->b:Landroid/graphics/Paint;

    invoke-virtual {p1, v8, v0, v1, v2}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V

    :goto_2
    add-int/lit8 v7, v7, 0x1

    move v1, v8

    goto :goto_0

    :cond_3
    return-void
.end method

.method protected onMeasure(II)V
    .locals 2

    .line 1
    iget p1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->d:I

    iget p2, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->e:I

    add-int/2addr p2, p1

    mul-int/lit8 p2, p2, 0x2

    iget v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->c:I

    add-int/lit8 v1, v0, -0x1

    mul-int p2, p2, v1

    iget v1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->h:I

    add-int/lit8 v0, v0, 0x1

    mul-int v0, v0, v1

    add-int/2addr p2, v0

    iget v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->f:I

    add-int/2addr p2, v0

    mul-int/lit8 p1, p1, 0x2

    mul-int/lit8 v1, v1, 0x2

    add-int/2addr p1, v1

    .line 2
    invoke-virtual {p0, p2, p1}, Landroid/view/View;->setMeasuredDimension(II)V

    return-void
.end method

.method public onPageScrollStateChanged(I)V
    .locals 0

    return-void
.end method

.method public onPageScrolled(IFI)V
    .locals 0

    return-void
.end method

.method public onPageSelected(I)V
    .locals 1

    .line 1
    iget v0, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->c:I

    if-eqz v0, :cond_0

    .line 2
    rem-int/2addr p1, v0

    iput p1, p0, Lcom/estrongs/android/widget/CircleIndicatorView;->i:I

    .line 3
    invoke-virtual {p0}, Landroid/view/View;->invalidate()V

    :cond_0
    return-void
.end method
